home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-11-19 | 1.1 KB | 80 lines | [TEXT/MPCC] |
- // AWindow.cpp
-
- #include <UReanimator.h>
- #include "AWindow.h"
- #include "ScreenTarget.h"
- #include <stdio.h>
- #include "DrawPoint.h"
-
-
- AWindow *
- AWindow::CreateWindow(
- short id,
- LCommander *super)
- {
- SetDefaultCommander(super);
- AWindow *theWindow =
- (AWindow*) UReanimator::ReadObjects('PPob', id);
- theWindow->FinishCreate();
- if (theWindow->HasAttribute(windAttr_ShowNew)) {
- theWindow->Show();
- }
-
- return theWindow;
- }
-
-
- AWindow *
- AWindow::CreateWindowStream(
- LStream *stream)
- {
- return new AWindow(stream);
- }
-
-
- AWindow::~AWindow()
- {
- if (fNetPoint) {
- delete fNetPoint;
- }
- }
-
-
- void
- AWindow::DoSetPosition(
- Point inPosition)
- {
- inherited::DoSetPosition(inPosition);
- MaybeRefresh();
- }
-
-
- void
- AWindow::DoSetBounds(
- const Rect &inBounds)
- {
- inherited::DoSetBounds(inBounds);
- MaybeRefresh();
- }
-
-
- void
- AWindow::SendAESetPosition(
- Point inPosition,
- Boolean inExecuteAE)
- {
- inherited::SendAESetPosition(inPosition, inExecuteAE);
- MaybeRefresh();
- }
-
-
- void
- AWindow::MaybeRefresh()
- {
- if (fScreenTarget) {
- fScreenTarget->UpdateFromWindow(mMacWindowP);
- Rect r = mMacWindowP->portRect;
- InvalPortRect(&r);
- }
- }
-